(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

f4(S(x''), S(x'), x3, x4, S(x)) → f2(S(x''), x', x3, x4, x)
f4(S(x'), 0, x3, x4, S(x)) → f3(x', 0, x3, x4, x)
f2(x1, x2, S(x''), S(x'), S(x)) → f5(x1, x2, S(x''), x', x)
f2(x1, x2, S(x'), 0, S(x)) → f3(x1, x2, x', 0, x)
f4(S(x'), S(x), x3, x4, 0) → 0
f4(S(x), 0, x3, x4, 0) → 0
f2(x1, x2, S(x'), S(x), 0) → 0
f2(x1, x2, S(x), 0, 0) → 0
f0(x1, S(x'), x3, S(x), x5) → f1(x', S(x'), x, S(x), S(x))
f0(x1, S(x), x3, 0, x5) → 0
f6(x1, x2, x3, x4, S(x)) → f0(x1, x2, x4, x3, x)
f5(x1, x2, x3, x4, S(x)) → f6(x2, x1, x3, x4, x)
f3(x1, x2, x3, x4, S(x)) → f4(x1, x2, x4, x3, x)
f1(x1, x2, x3, x4, S(x)) → f2(x2, x1, x3, x4, x)
f6(x1, x2, x3, x4, 0) → 0
f5(x1, x2, x3, x4, 0) → 0
f4(0, x2, x3, x4, x5) → 0
f3(x1, x2, x3, x4, 0) → 0
f2(x1, x2, 0, x4, x5) → 0
f1(x1, x2, x3, x4, 0) → 0
f0(x1, 0, x3, x4, x5) → 0

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

f4(S(x''), S(x'), x3, x4, S(x)) → f2(S(x''), x', x3, x4, x) [1]
f4(S(x'), 0, x3, x4, S(x)) → f3(x', 0, x3, x4, x) [1]
f2(x1, x2, S(x''), S(x'), S(x)) → f5(x1, x2, S(x''), x', x) [1]
f2(x1, x2, S(x'), 0, S(x)) → f3(x1, x2, x', 0, x) [1]
f4(S(x'), S(x), x3, x4, 0) → 0 [1]
f4(S(x), 0, x3, x4, 0) → 0 [1]
f2(x1, x2, S(x'), S(x), 0) → 0 [1]
f2(x1, x2, S(x), 0, 0) → 0 [1]
f0(x1, S(x'), x3, S(x), x5) → f1(x', S(x'), x, S(x), S(x)) [1]
f0(x1, S(x), x3, 0, x5) → 0 [1]
f6(x1, x2, x3, x4, S(x)) → f0(x1, x2, x4, x3, x) [1]
f5(x1, x2, x3, x4, S(x)) → f6(x2, x1, x3, x4, x) [1]
f3(x1, x2, x3, x4, S(x)) → f4(x1, x2, x4, x3, x) [1]
f1(x1, x2, x3, x4, S(x)) → f2(x2, x1, x3, x4, x) [1]
f6(x1, x2, x3, x4, 0) → 0 [1]
f5(x1, x2, x3, x4, 0) → 0 [1]
f4(0, x2, x3, x4, x5) → 0 [1]
f3(x1, x2, x3, x4, 0) → 0 [1]
f2(x1, x2, 0, x4, x5) → 0 [1]
f1(x1, x2, x3, x4, 0) → 0 [1]
f0(x1, 0, x3, x4, x5) → 0 [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

f4(S(x''), S(x'), x3, x4, S(x)) → f2(S(x''), x', x3, x4, x) [1]
f4(S(x'), 0, x3, x4, S(x)) → f3(x', 0, x3, x4, x) [1]
f2(x1, x2, S(x''), S(x'), S(x)) → f5(x1, x2, S(x''), x', x) [1]
f2(x1, x2, S(x'), 0, S(x)) → f3(x1, x2, x', 0, x) [1]
f4(S(x'), S(x), x3, x4, 0) → 0 [1]
f4(S(x), 0, x3, x4, 0) → 0 [1]
f2(x1, x2, S(x'), S(x), 0) → 0 [1]
f2(x1, x2, S(x), 0, 0) → 0 [1]
f0(x1, S(x'), x3, S(x), x5) → f1(x', S(x'), x, S(x), S(x)) [1]
f0(x1, S(x), x3, 0, x5) → 0 [1]
f6(x1, x2, x3, x4, S(x)) → f0(x1, x2, x4, x3, x) [1]
f5(x1, x2, x3, x4, S(x)) → f6(x2, x1, x3, x4, x) [1]
f3(x1, x2, x3, x4, S(x)) → f4(x1, x2, x4, x3, x) [1]
f1(x1, x2, x3, x4, S(x)) → f2(x2, x1, x3, x4, x) [1]
f6(x1, x2, x3, x4, 0) → 0 [1]
f5(x1, x2, x3, x4, 0) → 0 [1]
f4(0, x2, x3, x4, x5) → 0 [1]
f3(x1, x2, x3, x4, 0) → 0 [1]
f2(x1, x2, 0, x4, x5) → 0 [1]
f1(x1, x2, x3, x4, 0) → 0 [1]
f0(x1, 0, x3, x4, x5) → 0 [1]

The TRS has the following type information:
f4 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
S :: S:0 → S:0
f2 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
0 :: S:0
f3 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f5 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f0 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f1 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f6 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


f4
f2
f0
f6
f5
f3
f1

(c) The following functions are completely defined:
none

Due to the following rules being added:
none

And the following fresh constants: none

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

f4(S(x''), S(x'), x3, x4, S(x)) → f2(S(x''), x', x3, x4, x) [1]
f4(S(x'), 0, x3, x4, S(x)) → f3(x', 0, x3, x4, x) [1]
f2(x1, x2, S(x''), S(x'), S(x)) → f5(x1, x2, S(x''), x', x) [1]
f2(x1, x2, S(x'), 0, S(x)) → f3(x1, x2, x', 0, x) [1]
f4(S(x'), S(x), x3, x4, 0) → 0 [1]
f4(S(x), 0, x3, x4, 0) → 0 [1]
f2(x1, x2, S(x'), S(x), 0) → 0 [1]
f2(x1, x2, S(x), 0, 0) → 0 [1]
f0(x1, S(x'), x3, S(x), x5) → f1(x', S(x'), x, S(x), S(x)) [1]
f0(x1, S(x), x3, 0, x5) → 0 [1]
f6(x1, x2, x3, x4, S(x)) → f0(x1, x2, x4, x3, x) [1]
f5(x1, x2, x3, x4, S(x)) → f6(x2, x1, x3, x4, x) [1]
f3(x1, x2, x3, x4, S(x)) → f4(x1, x2, x4, x3, x) [1]
f1(x1, x2, x3, x4, S(x)) → f2(x2, x1, x3, x4, x) [1]
f6(x1, x2, x3, x4, 0) → 0 [1]
f5(x1, x2, x3, x4, 0) → 0 [1]
f4(0, x2, x3, x4, x5) → 0 [1]
f3(x1, x2, x3, x4, 0) → 0 [1]
f2(x1, x2, 0, x4, x5) → 0 [1]
f1(x1, x2, x3, x4, 0) → 0 [1]
f0(x1, 0, x3, x4, x5) → 0 [1]

The TRS has the following type information:
f4 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
S :: S:0 → S:0
f2 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
0 :: S:0
f3 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f5 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f0 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f1 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f6 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

f4(S(x''), S(x'), x3, x4, S(x)) → f2(S(x''), x', x3, x4, x) [1]
f4(S(x'), 0, x3, x4, S(x)) → f3(x', 0, x3, x4, x) [1]
f2(x1, x2, S(x''), S(x'), S(x)) → f5(x1, x2, S(x''), x', x) [1]
f2(x1, x2, S(x'), 0, S(x)) → f3(x1, x2, x', 0, x) [1]
f4(S(x'), S(x), x3, x4, 0) → 0 [1]
f4(S(x), 0, x3, x4, 0) → 0 [1]
f2(x1, x2, S(x'), S(x), 0) → 0 [1]
f2(x1, x2, S(x), 0, 0) → 0 [1]
f0(x1, S(x'), x3, S(x), x5) → f1(x', S(x'), x, S(x), S(x)) [1]
f0(x1, S(x), x3, 0, x5) → 0 [1]
f6(x1, x2, x3, x4, S(x)) → f0(x1, x2, x4, x3, x) [1]
f5(x1, x2, x3, x4, S(x)) → f6(x2, x1, x3, x4, x) [1]
f3(x1, x2, x3, x4, S(x)) → f4(x1, x2, x4, x3, x) [1]
f1(x1, x2, x3, x4, S(x)) → f2(x2, x1, x3, x4, x) [1]
f6(x1, x2, x3, x4, 0) → 0 [1]
f5(x1, x2, x3, x4, 0) → 0 [1]
f4(0, x2, x3, x4, x5) → 0 [1]
f3(x1, x2, x3, x4, 0) → 0 [1]
f2(x1, x2, 0, x4, x5) → 0 [1]
f1(x1, x2, x3, x4, 0) → 0 [1]
f0(x1, 0, x3, x4, x5) → 0 [1]

The TRS has the following type information:
f4 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
S :: S:0 → S:0
f2 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
0 :: S:0
f3 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f5 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f0 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f1 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0
f6 :: S:0 → S:0 → S:0 → S:0 → S:0 → S:0

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

0 => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

f0(z, z', z'', z1, z2) -{ 1 }→ f1(x', 1 + x', x, 1 + x, 1 + x) :|: x1 >= 0, x5 >= 0, z' = 1 + x', x' >= 0, x >= 0, z1 = 1 + x, z = x1, z'' = x3, z2 = x5, x3 >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = 1 + x, z1 = 0, x1 >= 0, x5 >= 0, x >= 0, z = x1, z'' = x3, z2 = x5, x3 >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = x4, x1 >= 0, x4 >= 0, x5 >= 0, z = x1, z'' = x3, z2 = x5, x3 >= 0, z' = 0
f1(z, z', z'', z1, z2) -{ 1 }→ f2(x2, x1, x3, x4, x) :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 1 + x, x >= 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f1(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f5(x1, x2, 1 + x'', x', x) :|: z' = x2, x1 >= 0, z2 = 1 + x, x' >= 0, x >= 0, z = x1, z'' = 1 + x'', z1 = 1 + x', x'' >= 0, x2 >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f3(x1, x2, x', 0, x) :|: z' = x2, z1 = 0, x1 >= 0, z2 = 1 + x, z'' = 1 + x', x' >= 0, x >= 0, z = x1, x2 >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, x1 >= 0, z'' = 1 + x', z2 = 0, x' >= 0, x >= 0, z1 = 1 + x, z = x1, x2 >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = 0, x1 >= 0, z2 = 0, x >= 0, z = x1, z'' = 1 + x, x2 >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z'' = 0, z' = x2, z1 = x4, x1 >= 0, x4 >= 0, x5 >= 0, z = x1, z2 = x5, x2 >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ f4(x1, x2, x4, x3, x) :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 1 + x, x >= 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ f3(x', 0, x3, x4, x) :|: z = 1 + x', z1 = x4, x4 >= 0, z2 = 1 + x, x' >= 0, x >= 0, z'' = x3, x3 >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ f2(1 + x'', x', x3, x4, x) :|: z = 1 + x'', z1 = x4, x4 >= 0, z' = 1 + x', z2 = 1 + x, x' >= 0, x >= 0, z'' = x3, x'' >= 0, x3 >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z = 1 + x', z' = 1 + x, z1 = x4, x4 >= 0, z2 = 0, x' >= 0, x >= 0, z'' = x3, x3 >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = x4, x4 >= 0, z2 = 0, x >= 0, z = 1 + x, z'' = x3, x3 >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = x4, x4 >= 0, x5 >= 0, z'' = x3, z = 0, z2 = x5, x2 >= 0, x3 >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ f6(x2, x1, x3, x4, x) :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 1 + x, x >= 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ f0(x1, x2, x4, x3, x) :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 1 + x, x >= 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z' = x2, z1 = x4, x1 >= 0, x4 >= 0, z2 = 0, z = x1, z'' = x3, x2 >= 0, x3 >= 0

(11) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(12) Obligation:

Complexity RNTS consisting of the following rules:

f0(z, z', z'', z1, z2) -{ 1 }→ f1(z' - 1, 1 + (z' - 1), z1 - 1, 1 + (z1 - 1), 1 + (z1 - 1)) :|: z >= 0, z2 >= 0, z' - 1 >= 0, z1 - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 >= 0, z' - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 >= 0, z'' >= 0, z' = 0
f1(z, z', z'', z1, z2) -{ 1 }→ f2(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f1(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f5(z, z', 1 + (z'' - 1), z1 - 1, z2 - 1) :|: z >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f3(z, z', z'' - 1, 0, z2 - 1) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z2 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z2 = 0, z'' - 1 >= 0, z1 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 = 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z'' = 0, z >= 0, z1 >= 0, z2 >= 0, z' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ f4(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ f3(z - 1, 0, z'', z1, z2 - 1) :|: z1 >= 0, z - 1 >= 0, z2 - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ f2(1 + (z - 1), z' - 1, z'', z1, z2 - 1) :|: z1 >= 0, z' - 1 >= 0, z2 - 1 >= 0, z - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z' - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 >= 0, z = 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ f6(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ f0(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0

(13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ f1, f0, f4, f2, f6, f3, f5 }

(14) Obligation:

Complexity RNTS consisting of the following rules:

f0(z, z', z'', z1, z2) -{ 1 }→ f1(z' - 1, 1 + (z' - 1), z1 - 1, 1 + (z1 - 1), 1 + (z1 - 1)) :|: z >= 0, z2 >= 0, z' - 1 >= 0, z1 - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 >= 0, z' - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 >= 0, z'' >= 0, z' = 0
f1(z, z', z'', z1, z2) -{ 1 }→ f2(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f1(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f5(z, z', 1 + (z'' - 1), z1 - 1, z2 - 1) :|: z >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f3(z, z', z'' - 1, 0, z2 - 1) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z2 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z2 = 0, z'' - 1 >= 0, z1 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 = 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z'' = 0, z >= 0, z1 >= 0, z2 >= 0, z' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ f4(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ f3(z - 1, 0, z'', z1, z2 - 1) :|: z1 >= 0, z - 1 >= 0, z2 - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ f2(1 + (z - 1), z' - 1, z'', z1, z2 - 1) :|: z1 >= 0, z' - 1 >= 0, z2 - 1 >= 0, z - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z' - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 >= 0, z = 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ f6(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ f0(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0

Function symbols to be analyzed: {f1,f0,f4,f2,f6,f3,f5}

(15) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: f1
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f0
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f4
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f2
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f6
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f3
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

Computed SIZE bound using CoFloCo for: f5
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(16) Obligation:

Complexity RNTS consisting of the following rules:

f0(z, z', z'', z1, z2) -{ 1 }→ f1(z' - 1, 1 + (z' - 1), z1 - 1, 1 + (z1 - 1), 1 + (z1 - 1)) :|: z >= 0, z2 >= 0, z' - 1 >= 0, z1 - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 >= 0, z' - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 >= 0, z'' >= 0, z' = 0
f1(z, z', z'', z1, z2) -{ 1 }→ f2(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f1(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f5(z, z', 1 + (z'' - 1), z1 - 1, z2 - 1) :|: z >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f3(z, z', z'' - 1, 0, z2 - 1) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z2 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z2 = 0, z'' - 1 >= 0, z1 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 = 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z'' = 0, z >= 0, z1 >= 0, z2 >= 0, z' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ f4(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ f3(z - 1, 0, z'', z1, z2 - 1) :|: z1 >= 0, z - 1 >= 0, z2 - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ f2(1 + (z - 1), z' - 1, z'', z1, z2 - 1) :|: z1 >= 0, z' - 1 >= 0, z2 - 1 >= 0, z - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z' - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 >= 0, z = 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ f6(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ f0(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0

Function symbols to be analyzed: {f1,f0,f4,f2,f6,f3,f5}
Previous analysis results are:
f1: runtime: ?, size: O(1) [0]
f0: runtime: ?, size: O(1) [0]
f4: runtime: ?, size: O(1) [0]
f2: runtime: ?, size: O(1) [0]
f6: runtime: ?, size: O(1) [0]
f3: runtime: ?, size: O(1) [0]
f5: runtime: ?, size: O(1) [0]

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: f1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 48 + 36·z' + 45·z''

Computed RUNTIME bound using CoFloCo for: f0
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + 36·z' + 45·z1

Computed RUNTIME bound using CoFloCo for: f4
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 9 + 36·z + 45·z'' + 2·z2

Computed RUNTIME bound using CoFloCo for: f2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 7 + 36·z + 45·z'' + 2·z2

Computed RUNTIME bound using CoFloCo for: f6
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 5 + 36·z' + 45·z''

Computed RUNTIME bound using CoFloCo for: f3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 8 + 36·z + 45·z1 + 2·z2

Computed RUNTIME bound using CoFloCo for: f5
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 6 + 36·z + 45·z''

(18) Obligation:

Complexity RNTS consisting of the following rules:

f0(z, z', z'', z1, z2) -{ 1 }→ f1(z' - 1, 1 + (z' - 1), z1 - 1, 1 + (z1 - 1), 1 + (z1 - 1)) :|: z >= 0, z2 >= 0, z' - 1 >= 0, z1 - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 >= 0, z' - 1 >= 0, z'' >= 0
f0(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 >= 0, z'' >= 0, z' = 0
f1(z, z', z'', z1, z2) -{ 1 }→ f2(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f1(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f5(z, z', 1 + (z'' - 1), z1 - 1, z2 - 1) :|: z >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ f3(z, z', z'' - 1, 0, z2 - 1) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z2 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z2 = 0, z'' - 1 >= 0, z1 - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 = 0, z >= 0, z2 = 0, z'' - 1 >= 0, z' >= 0
f2(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z'' = 0, z >= 0, z1 >= 0, z2 >= 0, z' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ f4(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f3(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ f3(z - 1, 0, z'', z1, z2 - 1) :|: z1 >= 0, z - 1 >= 0, z2 - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ f2(1 + (z - 1), z' - 1, z'', z1, z2 - 1) :|: z1 >= 0, z' - 1 >= 0, z2 - 1 >= 0, z - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z' - 1 >= 0, z'' >= 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 = 0, z - 1 >= 0, z'' >= 0, z' = 0
f4(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z1 >= 0, z2 >= 0, z = 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ f6(z', z, z'', z1, z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f5(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ f0(z, z', z1, z'', z2 - 1) :|: z >= 0, z1 >= 0, z2 - 1 >= 0, z' >= 0, z'' >= 0
f6(z, z', z'', z1, z2) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z2 = 0, z' >= 0, z'' >= 0

Function symbols to be analyzed:
Previous analysis results are:
f1: runtime: O(n1) [48 + 36·z' + 45·z''], size: O(1) [0]
f0: runtime: O(n1) [4 + 36·z' + 45·z1], size: O(1) [0]
f4: runtime: O(n1) [9 + 36·z + 45·z'' + 2·z2], size: O(1) [0]
f2: runtime: O(n1) [7 + 36·z + 45·z'' + 2·z2], size: O(1) [0]
f6: runtime: O(n1) [5 + 36·z' + 45·z''], size: O(1) [0]
f3: runtime: O(n1) [8 + 36·z + 45·z1 + 2·z2], size: O(1) [0]
f5: runtime: O(n1) [6 + 36·z + 45·z''], size: O(1) [0]

(19) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(20) BOUNDS(1, n^1)